package com.exwave.socialgame.model_wolfgame.wolfdata;


import java.util.HashMap;

public class Mould {

    public HashMap<Integer, Role> roles;

    public static Mould instanse;

    public static synchronized Mould getMould() {
        if (instanse == null) {
            instanse = new Mould();
        }
        return instanse;
    }

    private Mould() {

        this.roles = new HashMap<>();

        inti();
        //System.out.println(roles.get(1).getName());
    }

    private void inti() {
        Role villager = new Role("村民", "可以在白天发言讨论，参与投票", 1);
        villager.setAbility(0);//无技能;
        roles.put(villager.getNum(), villager);

        Role seer = new Role("预言家", "每晚可查看一名玩家是好人还是狼", 2);
        seer.setAbility(6);
        roles.put(seer.getNum(), seer);

        Role witch = new Role("女巫", "拥有一瓶解药和一瓶毒药", 3);
        witch.setAbility(5);//1解药，2毒药，3两瓶药都在
        roles.put(witch.getNum(), witch);

        Role hunter = new Role("猎人", "死后可以开枪带走一名玩家", 4);
        hunter.setAbility(1);
        roles.put(hunter.getNum(), hunter);

        Role rider = new Role("骑士", "发言阶段可以选择一名玩家冲锋，若其为狼人则该玩家死亡，否则自身死亡", 5);
        rider.setAbility(1);
        roles.put(rider.getNum(), rider);

        Role guard = new Role("守卫", "每晚可选择一名玩家不被狼人杀害，不能连续两天守护同一玩家", 6);
        guard.setAbility(4);
        roles.put(guard.getNum(), guard);

        Role werewolf = new Role("狼人", "每晚杀死一名玩家", 7);
        werewolf.setAbility(7);
        roles.put(werewolf.getNum(), werewolf);

        Role whiteWolfKing = new Role("白狼王", "自爆后可以直接杀死一名玩家", 8);
        whiteWolfKing.setAbility(7);
        roles.put(whiteWolfKing.getNum(), whiteWolfKing);

        Role wolfKing = new Role("狼王", "死后可以枪杀一名玩家（被女巫毒死除外）", 9);
        wolfKing.setAbility(7);
        roles.put(wolfKing.getNum(), wolfKing);

    }
}
